<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>首页</title>
    <link rel="stylesheet" href="__STATIC__/index/css/swiper/swiper.min.css">
  <!-- 阿里巴巴矢量图库 -->
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_561814_ow4c418badh7iudi.css">
  <!-- <link rel="stylesheet" type="text/css" media="screen and (max-width: 768px)" href="./css/index/index800.css" /> -->
  <!-- 设备大于1200时 -->
    <link rel="stylesheet" type="text/css" media="screen and (min-width: 1200px)" href="__STATIC__/index/css/index/index1200.css" />
  <!-- 设备960-1199时 -->
    <link rel="stylesheet" type="text/css" media="screen  and (min-width: 1080px) and (max-width: 1199px) " href="__STATIC__/index/css/index/index1080.css"
    />
  <!-- 设备960-1199时 -->
    <link rel="stylesheet" type="text/css" media="screen  and (min-width: 960px) and (max-width: 1079px) " href="__STATIC__/index/css/index/index960.css"
    />
  <!-- 设备768-959时 -->
    <link rel="stylesheet" type="text/css" media="screen  and (min-width: 768px) and (max-width: 959px) " href="__STATIC__/index/css/index/index768.css"
    />
  <!-- 设备568-768时 -->
    <link rel="stylesheet" type="text/css" media="screen  and (min-width: 568px) and (max-width: 767px) " href="__STATIC__/index/css/index/index568.css"
    />
  <!-- 设备375-567时 -->
    <link rel="stylesheet" type="text/css" media="screen  and (min-width: 375px) and (max-width: 567px) " href="__STATIC__/index/css/index/index375.css"
    />
  <!-- 设备320-375时 -->
    <link rel="stylesheet" type="text/css" media="screen  and (min-width: 320px) and (max-width: 374px) " href="__STATIC__/index/css/index/index320.css"
    />
  <!-- 设备小于320时 -->
    <link rel="stylesheet" type="text/css" media="screen  and (max-width: 319px) " href="__STATIC__/index/css/index/index320.css"
    />

</head>

<body>
    <div class="header PC">
        <div>
            <div class="logo">
                <a href="#">
                    <img src="__STATIC__/index/img/logo.png" alt="">
                </a>
            </div>
            <div class="address">
                <span class="iconfont icon-xiangxia"></span> <a href="{:url('Changestore/index')}">{if condition="$cur_city eq ''"}城市{else /}{$cur_city}{/if}</a>
            </div>
        </div>
        <div>
            {foreach name="$category" item="v"}
                <div class="beijing">
                    <div class="biaoti">
                        <div>
                            <a href="{:url('GoodsList/goods_list')}?cate_id={$v.id}">
                                <img src="{$v.logo}" alt="">
                            </a>
                        </div>
                        <div>
                            <a href="{:url('GoodsList/goods_list')}?cate_id={$v.id}">{$v.title}</a>
                        </div>
                    </div>
                </div>
            {/foreach}
          <!-- 登录注册 -->
            <div class="DengLu">
                <div>
                    <img src="__STATIC__/index/img/gourmet.png" alt="">
                </div>
                <div>
                    {if condition="empty($realname)"}
                    <a href="{:url('Login/loginin')}?url={$url}">登录</a>
                    /
                    <a href="{:url('Login/register')}">注册</a>
                    {else /}
                    <a href="{:url('User/index')}">{$realname}</a>
                    {/if}

                </div>
            </div>
            <div class="caidan">
                <span class="iconfont icon-msnui-menu"></span>
            </div>
        </div>
    </div>
    <!-- M版 -->
    <div class="header_M M">
        <div>
            <div>
                <a href="">
                    <img src="__STATIC__/index/img/MHeader/logo.png" alt="">
                </a>
            </div>
            <div>
                <span class="iconfont icon-ren1"></span>
                {if condition="empty($realname)"}
                <a href="{:url('Login/loginin')}?url={$url}">登录</a>
                /
                <a href="{:url('Login/register')}">注册</a>
                {else /}
                <a href="{:url('User/index')}">{$realname}</a>
                {/if}

            </div>
        </div>
    </div>
    <div class="swiper-container M">
        <div class="swiper-wrapper" style="transition-duration: 0ms;transform: translate3d(0px, 0px, 0px);">
            {foreach name="category" item="v"}
                <div class="swiper-slide">
                <a href="{:url('GoodsList/goods_list')}?cate_id={$v.id}" class="swiper-a swiper_a_border">
                    {$v.title}
                </a>
            </div>
            {/foreach}
        </div>
    </div>
    <div class="Content">
        <div class="carousel">
            <div class="seek">
                <div>
                    <input type="text" name="key" placeholder="点击搜索艺术美食 ">
                    <span class="iconfont icon-sousuo" onclick="search();"></span>
                </div>
            </div>
            <div class="">
                <div class="swiper-container1">
                    <div class="swiper-button-prev">
                        <img src="__STATIC__/index/img/swiper/list.png" alt="">
                    </div>
                    <div class="swiper-button-next">
                        <img src="__STATIC__/index/img/swiper/right.png" alt="">
                    </div>
                    <div class="swiper-wrapper ">
                        {foreach name="banner" item="v"}
                            <div class="swiper-slide">
                                <a href="{:url('GoodsList/goods_detail',array('id'=>$v.id))}" class="PC">
                                    <img src="{$v.pc_banner}" alt="" style="width:100%">
                                </a>
                                <a href="{:url('GoodsList/goods_detail',array('id'=>$v.id))}" class="M">
                                    <img src="{$v.mo_banner}" alt="" style="width:100%">
                                </a>
                            </div>
                        {/foreach}
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
            </div>
        </div>
      <!-- 热点 -->
        <div class="PC">
            <div class="hot">
                <div>
                    <img src="{$advert_1.hot_pc_banner}" alt="">
                </div>
                <div>
                    <div>
                        <p>/ {$advert_1.description} /</p>
                    </div>
                    <div>
                        <p>{$advert_1.title}</p>
                        <p>{$advert_1.subtitle}</p>
                        <p>{$advert_1.guige}</p>
                        <div>
                            <div>
                                <a href="{:url('GoodsList/goods_detail')}?id={$advert_1.id}">点 击 购 买</a>
                            </div>
                            <div>
                                <a href="{:url('GoodsList/goods_detail')}?id={$advert_1.id}">
                                    <span class="iconfont icon-gouwuche"></span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

      <!-- 空白 -->
        <div class="PC" style="height:100px;">
        </div>
      <!-- 空白结束 -->
      <!-- M版热点 -->
        <a href="{:url('GoodsList/goods_detail')}?id={$advert_1.id}">
        <div class="poster M">
            <div>
                <div>
                    <img src="__STATIC__/index/img/M-index/sole.png" alt="">
                </div>
                <div>
                    <p>{$advert_1.title}</p>
                    <p>{$advert_1.subtitle}</p>
                </div>
            </div>
            <p>/{$advert_1.description}/</p>
          <!-- <div>
                  <img src="./img/index/haibao.png" alt="">
              </div> -->
        </div>
        </a>
      <!-- 热点结束 -->
      <!-- 优惠券pc+M -->
        <div class="discounts ">
            <p>领取店铺优惠</p>
            <div>
                {if condition="!empty($coupon)"}
                    {foreach name="coupon" item="v"}
                        {if condition="$v.is_receive neq 0"}
                        <div>
                            <a href="javascript:;">
                                <span>￥{$v.reduce}</span>&nbsp;&nbsp;优惠券(已)</a>
                        </div>
                        {else /}
                        <div>
                            <a href="javascript:;" onclick="receive_coupon({$v.id})">
                                <span>￥{$v.reduce}</span>&nbsp;&nbsp;优惠券
                            </a>
                        </div>
                        {/if}
                    {/foreach}
                    <div>
                        <a href="{:url('User/my_coupon')}">更多优惠</a>
                    </div>
                {else /}
                    <div>
                        <a href="javascript:;">
                            <span>未发放</span>&nbsp;&nbsp;优惠券</a>
                    </div>
                    <div>
                        <a href="javascript:;">
                            <span>未发放</span>&nbsp;&nbsp;优惠券</a>
                    </div>
                    <div>
                        <a href="javascript:;">未发放</a>
                    </div>
                {/if}

            </div>
        </div>
      <!-- 优惠券结束 -->
      <!-- 品牌 pc-->
        <div class="brand PC">
            <div>
                <div></div>
                <div>
                    <div>
                        {$recommend_category_1.title}
                    </div>
                    <div>
                        {$recommend_category_1.description}
                        <!--<span>B R A N D</span>&nbsp;&nbsp;-->
                        <!--<span>B R A N D</span>-->
                    </div>
                </div>
                <div>
                    <a href="{:url('GoodsList/goods_list')}?cate_id={$recommend_category_1.id}">
                        M O R E
                    </a>
                </div>
            </div>
            <div>
                {foreach name="recommend_goods_1" item="v"}
                <div>
                    <div>
                        <img src="{$v.logo}" alt="">
                    </div>
                    <div>
                        <p>{$v.name}</p>
                        <p>{$v.subtitle}</p>
                        <p>￥
                            <span>{$v.price}</span>
                        </p>
                        <div>
                            <div>
                                <a href="{:url('GoodsList/goods_detail')}?id={$v.id}">点 击 购 买</a>
                            </div>
                            <div>
                                <a href="{:url('GoodsList/goods_detail')}?id={$v.id}">
                                    <span class="iconfont icon-gouwuche"></span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                {/foreach}
            </div>
        </div>
      <!-- 品牌结束 -->
      <!-- 品牌  M -->
        {foreach name="recommend_goods_1" item="v"}
            <a href="{:url('GoodsList/goods_detail')}?id={$v.id}" class="Mhot M">
                <div>
                    <div>
                        <img src="{$v.logo}" alt="">
                    </div>
                    <div>
                        <div>{$v.name}</div>
                        <div>{$v.subtitle}</div>
                        <div>
                            <div>￥{$v.price}</div>
                        </div>
                    </div>
                </div>
            </a>
        {/foreach}
      <!-- 品牌结束 -->
      <!-- M更多  标题 -->
        <a href="{:url('GoodsList/goods_list')}?cate_id={$recommend_category_1.id}" class="gengduo M">
            <div>
                <p>
                    <span>{$recommend_category_1.title}</span>
                    <span>{$recommend_category_1.description}</span>
                </p>
            </div>
            <div>
                <span class="iconfont icon-msnui-menu-right"></span>
            </div>
        </a>
      <!-- M更多结束 -->
      <!-- PC广告图片 -->
        <div class="banner PC">
            <img src="{$advert_2.hot_pic}" alt="">
        </div>
      <!-- PC广告图片结束 -->
      <!-- M广告图片 -->
        <a href="{:url('GoodsList/goods_detail')}?id={$advert_2.id}" class="Mbanner M">
            <img src="{$advert_2.hot_pic}" alt="">
            <div>
                <p>{$advert_2.title}</p>
                <p>{$advert_2.subtitle}</p>
                <p>￥
                    <span>{$advert_2.price}</span>
                </p>
            </div>
        </a>
      <!-- M广告图片结束 -->
      <!-- M饮品 -->
        <div class="Mdrink M">
            {foreach name="recommend_goods_2" item="v"}
            <a href="{:url('GoodsList/goods_detail')}?id={$v.id}">
                <div>
                    <div>
                        <p>{$v.name}</p>
                        <p>{$v.subtitle}</p>
                        <div>
                            <div>￥{$v.price}</div>
                        </div>
                    </div>
                    <img src="{$v.logo}" alt="">
                </div>
            </a>
            {/foreach}
        </div>
      <!-- M饮品结束 -->
      <!-- M更多  标题 -->
        <a href="{:url('GoodsList/goods_list')}?cate_id={$recommend_category_2.id}" class="gengduo M">
            <div>
                <p>
                    <span>{$recommend_category_2.title}</span>
                    <span>{$recommend_category_2.description}</span>
                </p>
            </div>
            <div>
                <span class="iconfont icon-msnui-menu-right"></span>
            </div>
        </a>
      <!-- M更多结束 -->
      <!-- M电话 -->
        <div class="Mnumber M">
            <p>/传递爱与感动的温柔美食/</p>
            <p>A GENTLE DELICACY THAT CONVEYS LOVE AND AFFECTION</p>
            <div>

                <div>
                    <span class="iconfont icon-msnui-telephone"></span>
                </div>
                <div>
                    <span>{:sysconf('site_phone')}</span>
                </div>
                <div>
                    <span>(服务时间 08:00-22:00)</span>
                </div>

            </div>
        </div>
      <!-- 电话结束 -->
      <!-- PC品牌 -->
        <div class="brand PC">
            <div>
                <div></div>
                <div>
                    <div>
                        {$recommend_category_2.title}
                    </div>
                    <div>
                        <span>{$recommend_category_2.description}</span>&nbsp;&nbsp;
                        <!--<span>B R A N D</span>-->
                    </div>
                </div>
                <div>
                    <a href="{:url('GodsList/goods_list')}?caet_id={$recommend_category_2.id}">
                        M O R E
                    </a>
                </div>
            </div>
            <div>
                {foreach name="recommend_goods_2" item="v"}
                    <div>
                        <div>
                            <img src="{$v.logo}" alt="">
                        </div>
                        <div>
                            <p>{$v.name}</p>
                            <p>{$v.subtitle}</p>
                            <p>￥
                                <span>{$v.price}</span>
                            </p>
                            <div>
                                <div>
                                    <a href="{:url('GoodsList/goods_list')}?id={$v.id}">点 击 购 买</a>
                                </div>
                                <div>
                                    <a href="{:url('GoodsList/goods_list')}?id={$v.id}">
                                        <span class="iconfont icon-gouwuche"></span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                {/foreach}
            </div>
        </div>
      <!-- PC品牌结束 -->

    </div>
    <!-- M脚部 -->
    <div class="Mfooter M">
        <div>
            <div>
                <a href="">新浪微博</a>
            </div>
            <div>
                <a href="">微信公众号</a>
            </div>
        </div>
        <div>
            <p>官网商城 2007-2017，版权所有 京ICP备888888888号-1</p>
        </div>
    </div>
    <!-- M脚部结束 -->
    <!-- PC脚部 -->
    <div class="footer PC">
        <div class="footer-content">
            <div class="footer-left">
                <div>
                    <img src="__STATIC__/index/img/foot-logo.png" alt="">
                </div>
                <p>A GENTLE DELICACY</p>
                <p>THAT CONVEYS</p>
                <p>LOVE AND AFFECTION</p>
            </div>
            <div class="footer-right">
                <div>
                    <div>
                        <span class="iconfont icon-weibo"></span>
                    </div>
                    <div>新浪微博</div>
                    <div>
                        <span class="iconfont icon-weixin"></span>
                    </div>
                    <div>公众平台</div>
                </div>
                <p>
                    <span class="iconfont icon-msnui-telephone"></span>
                    <span>{:sysconf('site_phone')}</span>
                    <span>（服务时间8：00-22：00）</span>
                </p>
                <div>
                    <div>
                        <a href="{:url('Article/index')}?cate_id=1">联系我们</a>
                    </div>
                    <div></div>
                    <div>
                        <a href="{:url('Article/index')}?cate_id=2">招兵买马</a>
                    </div>
                    <div></div>
                    <div>
                        <a href="{:url('Article/index')}?cate_id=3">企业合作</a>
                    </div>
                    <div></div>
                    <div>
                        <a href="{:url('Article/index')}?cate_id=4">产品导航</a>
                    </div>
                    <div></div>
                    <div>
                        <a href="{:url('Article/index')}?cate_id=5">企业文化</a>
                    </div>
                </div>
                <p>官网商城 2007-2017，版权所有 京ICP备888888888号-1</p>
            </div>
        </div>
    </div>
    <!-- PC脚部结束 -->
    <script src="__STATIC__/index/js/swiper/swiper.min.js"></script>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>
        var mySwiper = new Swiper('.swiper-container1', {
            autoplay: true, //可选选项，自动滑动
            loop: true,
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },
        });
        var mySwiper = new Swiper('.swiper-container', {
            slidesPerView: 'auto',
            slidesPerView: 5.5,

        });

        /**
         * 搜索
         */
        function search(){
            var key = $('input[name=key]').val();
            window.location.href = "{:url('Index/search')}?key="+key;
        }

        /**
         * 领取优惠券
         * @param id
         */
        function receive_coupon(id){
            $.post("{:url('Index/receive_coupon')}",
                {id:id},
                function(data){
                    if(data.code == 1){
                        alert('领取成功');
                        location.reload();
                    }else{
                        alert(data.msg);
                        if(data.data == 7){     //去登陆
                            window.location.href = "{:url('Login/loginin')}";
                        }
                    }
                }
            );
        }

        /**
         * 领取权益优惠券
         */
        function get_qy_coupon(){
            $.post("{:url('Index/get_qy_coupon')}",
                {id:1},
                function(data){
                    if(data.code == 1){
                        alert('领取成功');
                    }else if(data.code == 0){
                        alert('领取失败');
                    }else{
                        alert(data.msg);
                        window.location.href = "{:url('Login/loginin')}";
                    }
                }
            );
        }


//        $(document).ready(function(){
//            var has_qy_coupon = "{$has_qy_coupon}";
//            if(has_qy_coupon == 1){
//                alert('领取优惠券');
//            }
//        });
    </script>
</body>

</html>